from integrate_py import integrate_f_py as f0
from integrate import integrate_f as f1
from integrate_cy import integrate_f_cy as f2
import datetime

a, b, N = -1e2, 1e2, 1e7
N = int(N)
t0 = datetime.datetime.now()
f0v = f0(a, b, N)
print('f0v', f0v)
t1 = datetime.datetime.now()
dt = t1 - t0
print(dt)
dtm0 = dt.microseconds + 1e6 * dt.seconds
print(dtm0)
f1v = f1(a, b, N)
print('f1v', f1v)
t2 = datetime.datetime.now()
dt = t2 - t1
print(dt)
dtm1 = dt.microseconds + 1e6 * dt.seconds
print(dtm1)
print(dtm1 / dtm0)
f2v = f2(a, b, N)
print('f2v', f2v)
t3 = datetime.datetime.now()
dt = t3 - t2
print(dt)
dtm2 = dt.microseconds + 1e6 * dt.seconds
print(dtm2)
print(dtm2 / dtm1)
